<template>
  <view class="nav">
    <u-navbar
      :title="title"
      :autoBack="autoBack"
      :bgColor="bgColor"
      :safeAreaInsetTop="true"
      :leftIconColor="leftIconColor"
      :titleStyle="titleStyle"
      :leftIconSize="leftIconSize"
      :placeholder="placeholder"
      :fixed="fixed"
      @leftClick="handleLeftClick"
    >
    </u-navbar>
  </view>
</template>

<script setup lang="ts">
const props = defineProps({
  title: {
    type: String,
    default: ''
  },
  autoBack: {
    type: Boolean,
    default: false
  },
  bgColor: {
    type: String,
    default: '#fff'
  },
  leftIconColor: {
    type: String,
    default: '#fff'
  },
  titleStyle: {
    type: String,
    default: 'color:#0E0E0E'
  },
  leftIconSize: {
    type: String,
    default: '42rpx'
  },
  placeholder: {
    type: Boolean,
    default: true
  },
  fixed: {
    type: Boolean,
    default: true
  }
});

const emit = defineEmits(['leftClick']);

const handleLeftClick = () => {
  emit('leftClick');
};
</script>

<style lang="scss"></style>
